package com.trkj.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.trkj.pojo.Position;

public interface PositionDAO extends JpaRepository<Position, Integer>,JpaSpecificationExecutor<Position> {
	/**
	 * 查询比当前等级高的职位
	 */
	@Query("select new com.trkj.pojo.Position(p.positionId, p.positionName) from Position p where p.positionLevel > ?1")
	public List<Position> queryLevelOptions(Integer level);
}
